/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class WaterVolumeSensor {
    static categoryCode = '010020004';

    static categoryName = '水量传感器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return WaterVolumeSensor.categoryCode;
    }

    get categoryName() {
        return WaterVolumeSensor.categoryName;
    }

    getAlarmStatus(params) {
        return command({
            method: 'getAlarmStatus',
            methodId: 'pDrhEqxr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getAlarmSwitch(params) {
        return command({
            method: 'getAlarmSwitch',
            methodId: 'p1vFBbuA',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getAlarmThreshold(params) {
        return command({
            method: 'getAlarmThreshold',
            methodId: 'phEq11wZ',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getFlowDuration(params) {
        return command({
            method: 'getFlowDuration',
            methodId: 'pGox7xQC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getFlowRate(params) {
        return command({
            method: 'getFlowRate',
            methodId: 'pZgRtiXU',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWaterVolume(params) {
        return command({
            method: 'getWaterVolume',
            methodId: 'pUPQOyyw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setAlarmSwitch(params) {
        return command({
            method: 'setAlarmSwitch',
            methodId: 'peHyqOEm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setAlarmThreshold(params) {
        return command({
            method: 'setAlarmThreshold',
            methodId: 'ppAXijJP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default WaterVolumeSensor;
